#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    resize(800, 600);
    // QPushButton *btn = new QPushButton("按钮", this);
    // connect(btn, &QPushButton::clicked, this, [=](){
    //     this->close();
    // });

    QPushButton *btn = new QPushButton("按钮", this);
    connect(btn, &QPushButton::clicked,[=](){
        this->close();
    });
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}
